package com.carbon.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.carbon.system.entity.RoleMenu;
import org.apache.ibatis.annotations.Param;
import java.util.List;

public interface RoleMenuMapper extends BaseMapper<RoleMenu> {

    // 根据角色ID列表查询菜单ID列表
    List<Long> selectMenuIdsByRoleIds(@Param("roleIds") List<Long> roleIds);

    Boolean saveRolePermissions(@Param("roleId") Long roleId, @Param("permissionIds") List<Long> permissionIds);

    void deleteByRoleId(Long roleId);
}